<!--创建专项活动评价-->
<template>
  <div class="wrapper-container">
    <el-form ref="form" class="my-form">
      <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row">
            <el-col class="name-col" :span="6"> 学期 </el-col>
            <el-col class="content-col" :span="18">
              <SelectItem
                :name="''"
                :value="xq"
                @change="
                  (e) => {
                    xq = e;
                  }
                "
                :xqList="xqList"
              ></SelectItem>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row">
            <el-col class="name-col" :span="6"> 评价活动名称 </el-col>
            <el-col class="content-col" :span="18">
              <el-input
                v-model="baseInfo.courseName"
                style="width: 50%"
                size="small"
              ></el-input>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row class="single-row">
        <el-col :span="12">
          <el-row class="item-row">
            <el-col class="name-col" :span="12"> 开始时间 </el-col>
            <el-col class="content-col" :span="12">
              <el-date-picker
                v-model="baseInfo.startDate"
                type="date"
                style="width: 50%"
              >
              </el-date-picker>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="12">
          <el-row class="item-row">
            <el-col class="name-col" :span="12"> 结束时间 </el-col>
            <el-col class="content-col" :span="12">
              <el-date-picker
                v-model="baseInfo.endDate"
                type="date"
                style="width: 50%"
              >
              </el-date-picker>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row">
            <el-col class="name-col" :span="6"> 指标体系 </el-col>
            <el-col class="content-col" :span="18">
              <SelectItem
                :name="''"
                :value="baseInfo.system"
                @change="
                  (e) => {
                    baseInfo.system = e;
                  }
                "
                :xqList="systemList"
              ></SelectItem>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row">
            <el-col class="name-col" :span="6"> 各个等级比例限制 </el-col>
            <el-col class="content-col" :span="18">
              <InputItem
                :name="'A'"
                :value="baseInfo.levelA"
                @input="
                  (e) => {
                    baseInfo.levelA = e;
                  }
                "
                :endText="'%'"
              ></InputItem>
              <InputItem
                :name="'B'"
                :value="baseInfo.levelB"
                @input="
                  (e) => {
                    baseInfo.levelB = e;
                  }
                "
                :endText="'%'"
              ></InputItem>
              <InputItem
                :name="'C'"
                :value="baseInfo.levelC"
                @input="
                  (e) => {
                    baseInfo.levelC = e;
                  }
                "
                :endText="'%'"
              ></InputItem>
              <InputItem
                :name="'D'"
                :value="baseInfo.levelD"
                @input="
                  (e) => {
                    baseInfo.levelD = e;
                  }
                "
                :endText="'%'"
              ></InputItem>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
      <el-row class="single-row">
        <el-col :span="24">
          <el-row class="item-row" style="height: 115px">
            <el-col class="name-col" style="height: 100%" :span="6">
              评价说明
            </el-col>
            <el-col class="content-col" style="height: 100%" :span="18">
              <el-input
                style="width: 50%; margin: 10px 0; max-height: 90px"
                type="textarea"
                placeholder="请输入内容"
                v-model="baseInfo.introl"
              >
              </el-input>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
    </el-form>
    <div class="table-container">
      <span class="name-col" style="background-color: white">评价关系设置</span>
      <el-table
        :data="tableData"
        border
        class="table-data"
        row-class-name="row-class"
        cell-class-name="cell-class"
        header-row-class-name="header-row-class"
        header-cell-class-name="header-cell-class"
      >
        <el-table-column prop="task" label="承担任务" align="center">
        </el-table-column>
        <el-table-column prop="numName" label="教员" align="center">
          <template slot-scope="scope">
            <SelectItem
              :name="''"
              :value="scope.row.teacherName"
              @change="
                (e) => {
                  scope.row.teacherName = e;
                }
              "
              :xqList="teacherList"
            ></SelectItem>
          </template>
        </el-table-column>
        <el-table-column prop="className" label="评价教学班" align="center">
          <template slot-scope="scope">
            <SelectItem
              :name="''"
              :value="scope.row.className"
              @change="
                (e) => {
                  scope.row.className = e;
                }
              "
              :xqList="classList"
            ></SelectItem>
          </template>
        </el-table-column>
        <el-table-column prop="scoreNature" label="操作" align="center">
          <template slot-scope="scope">
            <div
              style="
                display: flex;
                padding-left: 10px;
                justify-content: space-around;
              "
            >
              <ButtonItem
                @click=""
                :name="'保存'"
                :link="''"
                :icon="'el-icon-circle-plus-outline'"
                :buttonColor="'yellow'"
              ></ButtonItem>

              <ButtonItem
                @click=""
                :name="'删除'"
                :link="''"
                :icon="'el-icon-circle-close'"
                :buttonColor="'red'"
              ></ButtonItem>
            </div>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <div class="bottom-block">
      <div style="width: 300px; display: flex; justify-content: space-around">
        <ButtonItem
          :name="'保存'"
          :link="''"
          :icon="''"
          :buttonColor="'yellow'"
        ></ButtonItem>

        <ButtonItem
          :name="'取消'"
          :link="''"
          :icon="''"
          :buttonColor="'red'"
        ></ButtonItem>
      </div>
    </div>
  </div>
</template>

<script>
import SelectItem from "../../../components/SelectItem.vue";
import InputItem from "../../../components/InputItem.vue";
import ButtonItem from "../../../components/ButtonItem.vue";
import Subscript from "../../../components/Subscript.vue";
export default {
  components: {
    SelectItem,
    InputItem,
    ButtonItem,
    Subscript,
  },
  data() {
    return {
      xq: "2020春",
      xqList: [
        {
          value: "2020春",
          label: "2020春",
        },
        {
          value: "2020夏",
          label: "2020夏",
        },
      ],
      systemList: [],
      teacherList: [],
      classList: [],
      baseInfo: {
        courseName: "",
      },
      tableData: [
        {
          task: "任务1",
          teacherName: "",
          className: "",
        },
        {
          task: "任务2",
          teacherName: "",
          className: "",
        },
        {
          task: "任务3",
          teacherName: "",
          className: "",
        },
      ],
      multipleSelection: [],
    };
  },
  mounted() {},
  methods: {},
  computed: {},
};
</script>
<style lang="less" scoped>
.search-container {
  justify-content: flex-start !important;
}

.search-button {
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 27px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  border-radius: 6px;

  > span {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #51aef6;
  }

  > img {
    width: 19px;
    height: 19px;
    margin-right: 4px;
  }
}

.table-container {
  margin-top: 30px;

  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .wrapper-button {
    display: flex;
    flex-direction: column;
    align-items: center;

    > div {
      margin-bottom: 8px;
    }
  }
}
</style>

<style lang="less" scoped>
.item-row .el-col {
  display: flex;
  align-items: center;
  min-height: 60px;
  border-right: none !important;
}
.item-row .el-col:not(:first-child) {
  border-left: 1px solid rgba(0, 76, 167, 0.39);
}
.single-row .el-col:not(:last-child) {
  border-right: 1px solid rgba(0, 76, 167, 0.39);
}
.my-form .single-row:not(:last-child) {
  border-bottom: 1px solid rgba(0, 76, 167, 0.39);
}
.name-col {
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #004ca7;
  background: rgba(77, 129, 192, 0.1);
}
.content-col {
  padding-left: 40px;
  color: #004ca7;
}
.wrapper-container {
  .my-form {
    width: 100%;
    border: 1px solid rgba(0, 76, 167, 0.8);
    margin: 57px auto 19px;
    border-radius: 9px;
  }
}
@import "../../../styles/special.less";
.bottom-block {
  padding-top: 30px;
  display: flex;
  flex-direction: row;
  justify-content: center;
}
.table-container ::v-deep .el-table--border .el-table__cell:first-child .cell {
  padding-left: 10px !important;
}
.filter-button1::v-deep .el-radio-button .el-radio-button__inner {
  border-radius: 6px !important;
  border: 1px solid rgb(245, 134, 106);
  color: rgb(245, 134, 106);
  background-color: rgb(254, 237, 226);
}
.filter-button1::v-deep
  .el-radio-button__orig-radio:checked
  + .el-radio-button__inner {
  border: 1px solid rgb(245, 134, 106);
  color: white;
  background-color: rgb(245, 134, 106);
}
.filter-button {
  display: flex;
  margin-top: 27px;
}
.wrapper-container {
  width: 1711px;
  margin: 0 auto;
}
.table-container {
  margin-top: 30px;

  .table-data {
    margin-top: 10px;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}

.save-button {
  width: 87px;
  height: 36px;
  line-height: 36px;
  background: #fff6ef;
  border: 1px solid #f3b815;
  border-radius: 6px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #f3b815;
  text-align: center;
  margin: 82px auto;
}

.zuoyou {
  width: 200px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
</style>
